from django.db import models

# Create your models here.

class User(models.Model):
    Role=((1,'学生'),(2,'老师'))
    uname=models.CharField(max_length=20,null=False)
    upwd=models.CharField(max_length=20,null=False)
    role=models.IntegerField(choices=Role,null=False)

#请假类型
class G_Leave(models.Model):
    g_leave=models.CharField(max_length=20,null=False)

#状态
class S_Leave(models.Model):
    Status=((0,'待审核'),(1,'通过'),(2,'未通过'))
    stu_name=models.CharField(max_length=20,null=False)
    status=models.IntegerField(choices=Status,default=0)
    createTime=models.DateTimeField()
    context=models.CharField(max_length=200)
    tid=models.ForeignKey(to=G_Leave,on_delete=models.CASCADE)



